import Layout from '@/layouts'
export const routeName = 'my'
import ParentLayout from '@/layouts/parentLayout.vue'

const my = [
  {
    path: '/my',
    component: Layout,
    redirect: '/my/study',
    meta: { title: '个人中心' },
    children: [
      {
        path: 'study',
        component: () => import('@/views/my'),
        meta: { title: '学习中心', key: 'study', needLogin: true },
        children: [
          {
            path: 'basic',
            name: `${routeName}_study_basic`,
            component: () => import('@/views/my/study/basic'),
            meta: { title: '概况', key: 'basic', needLogin: true }
          },
          {
            path: 'communication',
            name: `${routeName}_study_communication`,
            component: () => import('@/views/my/study/communication'),
            meta: { title: '我的评论', key: 'communication', needLogin: true }
          },
          {
            path: 'record',
            name: `${routeName}_study_record`,
            component: () => import('@/views/my/study/record'),
            meta: { title: '学习记录', key: 'record', needLogin: true }
          },
          {
            path: 'collection',
            name: `${routeName}_study_collection`,
            component: () => import('@/views/my/study/collection'),
            meta: { title: '我的收藏', key: 'collection', needLogin: true }
          },
          {
            path: 'cert',
            name: `${routeName}_study_cert`,
            component: () => import('@/views/my/study/certificate'),
            meta: { title: '我的证书', key: 'cert', needLogin: true }
          },
          {
            path: 'certificate/:id',
            name: `${routeName}_study_cert_flow`,
            component: () => import('@/views/my/study/viewCertificate'),
            meta: { title: '我的证书', key: 'cert', needLogin: true }
          },
          {
            path: 'schedule',
            name: `${routeName}_study_schedule`,
            component: () => import('@/views/my/study/schedule'),
            meta: { title: '直播课表', key: 'schedule', needLogin: true }
          },
          {
            path: 'course',
            name: `${routeName}_study_course`,
            component: () => import('@/views/my/study/course/index'),
            redirect: 'course/video',
            meta: { title: '我的课程' },
            children: [
              {
                path: 'video',
                name: `${routeName}_study_course_video`,
                component: () => import('@/views/my/study/course/video'),
                meta: {
                  key: 'course',
                  title: '点播',
                  needLogin: true
                }
              },
              {
                path: 'live',
                name: `${routeName}_study_course_live`,
                component: () => import('@/views/my/study/course/live'),
                meta: {
                  key: 'course',
                  title: '点播',
                  needLogin: true
                }
              },
              {
                path: 'classes',
                name: `${routeName}_study_course_classes`,
                component: () => import('@/views/my/study/course/classes'),
                meta: {
                  key: 'course',
                  title: '点播',
                  needLogin: true
                }
              }
            ]
          }
        ]
      },
      {
        path: 'finance',
        component: () => import('@/views/my'),
        meta: { title: '财务中心', key: 'finance', needLogin: true },
        children: [
          {
            path: 'my_order',
            name: `${routeName}_finance_my_order`,
            component: () => import('@/views/my/finance/order'),
            meta: { title: '我的订单', key: 'my_order', needLogin: true }
          },
          {
            path: 'my_balance',
            name: `${routeName}_finance_my_balance`,
            component: () => import('@/views/my/finance/balance'),
            meta: { title: '我的余额', key: 'my_balance', needLogin: true }
          },
          {
            path: 'balance_flow',
            name: `${routeName}_finance_my_balance_flow`,
            component: () => import('@/views/my/finance/balanceFlow'),
            meta: { key: 'my_balance', needLogin: true }
          },
          {
            path: 'my_credit',
            name: `${routeName}_finance_my_credit`,
            component: () => import('@/views/my/finance/credit'),
            meta: { key: 'my_credit', title: '我的积分', needLogin: true }
          },
          {
            path: 'my_coupon',
            name: `${routeName}_finance_my_coupon`,
            component: () => import('@/views/my/finance/coupon'),
            meta: { key: 'my_coupon', title: '我的卡券', needLogin: true }
          },
          {
            path: 'my_vip',
            name: `${routeName}_finance_my_vip`,
            component: () => import('@/views/my/finance/vip'),
            meta: { key: 'my_vip', title: '我的会员', needLogin: true }
          },
          {
            path: 'my_vip_flow',
            name: `${routeName}_finance_my_vip_flow`,
            component: () => import('@/views/my/finance/vipFlow'),
            meta: { key: 'my_vip', title: '我的会员', needLogin: true }
          },
          {
            path: 'my_income',
            name: `${routeName}_finance_my_income`,
            component: () => import('@/views/my/finance/income'),
            meta: { key: 'my_income', needLogin: true }
          },
          {
            path: 'income_detail',
            name: `${routeName}_finance_my_income_detail`,
            component: () => import('@/views/my/finance/incomeDetail'),
            meta: { key: 'my_income', needLogin: true }
          },
          {
            path: 'my_course',
            name: `${routeName}_finance_my_course`,
            component: () => import('@/views/my/finance/course'),
            meta: { key: 'my_income', needLogin: true }
          },
          {
            path: 'my_user',
            name: `${routeName}_finance_my_user`,
            component: () => import('@/views/my/finance/user'),
            meta: { key: 'my_income', needLogin: true }
          }
        ]
      },
      {
        path: 'interaction',
        component: () => import('@/views/my'),
        redirect: '/my/interaction/my_wenda',
        meta: { title: '社交中心', needLogin: true },
        children: [
          {
            path: 'my_wenda',
            name: `${routeName}_interaction_my_wenda`,
            component: () => import('@/views/my/interaction/wenda'),
            meta: { key: 'profile', title: '我的问答', needLogin: true }
          },
          {
            path: 'my_recommendation',
            name: `${routeName}_interaction_my_recommendation`,
            component: () => import('@/views/my/interaction/recommendation'),
            meta: { title: '我的推荐', needLogin: true }
          },
          {
            path: 'recommendation_member',
            name: `${routeName}_interaction_recommendation_member`,
            component: () => import('@/views/my/interaction/recommendationMember'),
            meta: { title: '我的推荐', needLogin: true }
          }
        ]
      },
      {
        path: 'profile',
        component: () => import('@/views/my'),
        meta: { title: '个人设置', needLogin: true },
        children: [
          {
            path: 'my_profile',
            name: `${routeName}_profile_my_profile`,
            component: () => import('@/views/my/profile/profile'),
            meta: { key: 'my_profile', title: '资料设置', needLogin: true }
          },
          {
            path: 'my_photo',
            name: `${routeName}_profile_my__photo`,
            component: () => import('@/views/my/profile/photo'),
            meta: { key: 'my_profile', title: '资料设置', needLogin: true }
          },
          {
            path: 'my_authentication',
            name: `${routeName}_profile_my_authentication`,
            component: () => import('@/views/my/profile/auth'),
            meta: { key: 'my_authentication', title: '认证中心', needLogin: true }
          },
          {
            path: 'my_address',
            name: `${routeName}_profile_my_address`,
            component: () => import('@/views/my/profile/address'),
            meta: { key: 'my_address', title: '收货地址', needLogin: true }
          },
          {
            path: 'my_account',
            name: `${routeName}_profile_my_account`,
            component: () => import('@/views/my/profile/account'),
            meta: { key: 'my_account', title: '账户设置', needLogin: true }
          },
          {
            path: 'thirdlogin',
            name: `${routeName}_profile_thirdlogin`,
            component: () => import('@/views/my/profile/thirdlogin'),
            meta: { key: 'my_account', title: '第三方登录', needLogin: true }
          },
          {
            path: 'thirdlogindel',
            name: `${routeName}_profile_thirdlogindel`,
            component: () => import('@/views/my/profile/thirdlogindel'),
            meta: { key: 'my_account', title: '第三方登录', needLogin: true }
          },
          {
            path: 'payPwd',
            name: `${routeName}_profile_payPwd`,
            component: () => import('@/views/my/profile/payPwd'),
            meta: { key: 'my_account', title: '支付密码', needLogin: true }
          },
          {
            path: 'face_verify',
            name: `${routeName}_profile_face_verify`,
            component: () => import('@/views/my/profile/face'),
            meta: { key: 'face_verify', title: '人脸认证', needLogin: true }
          }
        ]
      },
      {
        path: 'notify',
        component: () => import('@/views/my'),
        meta: { key: 'notify', title: '消息中心', needLogin: true },
        children: [
          {
            path: 'course_notify',
            name: `${routeName}_notify_course_notify`,
            component: () => import('@/views/my/notify/course'),
            meta: { key: 'course_notify', title: '消息中心-课程提醒', needLogin: true }
          },
          {
            path: 'social_notify',
            name: `${routeName}_notify_social_notify`,
            component: () => import('@/views/my/notify/social'),
            meta: { key: 'social_notify', title: '消息中心-互动消息', needLogin: true }
          },
          {
            path: 'system_notify',
            name: `${routeName}_notify_system_notify`,
            component: () => import('@/views/my/notify/system'),
            meta: { key: 'system_notify', title: '消息中心-系统消息', needLogin: true }
          },
          {
            path: 'question_notify',
            name: `${routeName}_notify_question_notify`,
            component: () => import('@/views/my/notify/question'),
            meta: { key: 'question_notify', title: '消息中心-提问', needLogin: true }
          }
        ]
      },
      {
        path: 'classes',
        component: () => import('@/views/my'),
        meta: { key: 'classes', title: '教学中心' },
        children: [
          {
            path: 'my_classes',
            name: `${routeName}_classes_my_classes`,
            component: () => import('@/views/my/classes/classes'),
            meta: { key: 'my_classes', title: '教学中心-任教班级', needLogin: true }
          },
          {
            path: 'student',
            name: `${routeName}_classes_student`,
            component: () => import('@/views/my/classes/classes/student'),
            meta: { key: 'my_classes', title: '教学中心-学员管理', needLogin: true }
          },
          {
            path: 'teach',
            component: () => import('@/views/my/classes/teaching/index'),
            redirect: 'teach/list',
            meta: { title: '我的授课' },
            children: [
              {
                path: 'list',
                name: `${routeName}_classes_my_teach`,
                component: () => import('@/views/my/classes/teaching/list'),
                meta: { key: 'my_teach', title: '全部', needLogin: true }
              },
              {
                path: 'video',
                name: `${routeName}_classes_my_teach_video`,
                component: () => import('@/views/my/classes/teaching/video/index'),
                meta: {
                  key: 'my_teach',
                  title: '点播',
                  needLogin: true
                }
              },
              {
                path: 'live',
                name: `${routeName}_classes_my_teach_live`,
                component: () => import('@/views/my/classes/teaching/live/index'),
                meta: {
                  key: 'my_teach',
                  title: '点播',
                  needLogin: true
                }
              }
            ]
          },
          {
            path: 'teach',
            component: ParentLayout,
            meta: { title: '我的授课' },
            children: [
              {
                path: 'create',
                name: `${routeName}_classes_my_teach_create`,
                component: () => import('@/views/my/classes/teaching/create'),
                meta: { key: 'my_teach', title: '添加课程', needLogin: true }
              },
              {
                path: 'edit',
                name: `${routeName}_classes_my_teach_edit`,
                component: () => import('@/views/my/classes/teaching/edit'),
                meta: { key: 'my_teach', title: '编辑课程', needLogin: true }
              },
              {
                path: 'video',
                component: ParentLayout,
                redirect: 'video/:id',
                meta: { title: '点播' },
                children: [
                  {
                    path: ':id',
                    name: `${routeName}_classes_my_teach_section`,
                    component: () => import('@/views/my/classes/teaching/video/list'),
                    meta: { key: 'my_teach', title: '课时管理', needLogin: true }
                  },
                  {
                    path: ':id/create',
                    name: `${routeName}_classes_my_teach_section_create`,
                    component: () => import('@/views/my/classes/teaching/video/create'),
                    meta: { key: 'my_teach', title: '添加课时', needLogin: true }
                  },
                  {
                    path: ':id/edit',
                    name: `${routeName}_classes_my_teach_section_edit`,
                    component: () => import('@/views/my/classes/teaching/video/edit'),
                    meta: { key: 'my_teach', title: '编辑课时', needLogin: true }
                  }
                ]
              },
              {
                path: 'live',
                component: ParentLayout,
                redirect: 'live/big',
                meta: { title: '直播' },
                children: [
                  {
                    path: 'big',
                    component: ParentLayout,
                    redirect: 'big/:id',
                    meta: { title: '大班课' },
                    children: [
                      {
                        path: ':id',
                        name: `${routeName}_classes_my_teach_live`,
                        component: () => import('@/views/my/classes/teaching/live/big/list'),
                        meta: { key: 'my_teach', title: '课时管理', needLogin: true }
                      },
                      {
                        path: ':id/create',
                        name: `${routeName}_classes_my_teach_live_section_create`,
                        component: () => import('@/views/my/classes/teaching/live/big/create'),
                        meta: { key: 'my_teach', title: '添加课时', needLogin: true }
                      },
                      {
                        path: ':id/edit',
                        name: `${routeName}_classes_my_teach_live_section_edit`,
                        component: () => import('@/views/my/classes/teaching/live/big/edit'),
                        meta: { key: 'my_teach', title: '编辑课时', needLogin: true }
                      }
                    ]
                  },
                  {
                    path: 'small',
                    component: ParentLayout,
                    redirect: 'small:id',
                    meta: { title: '小班课' },
                    children: [
                      {
                        path: ':id',
                        name: `${routeName}_classes_my_teach_live_section`,
                        component: () => import('@/views/my/classes/teaching/live/small/list'),
                        meta: { key: 'my_teach', title: '课时管理', needLogin: true }
                      },
                      {
                        path: ':id/create',
                        name: `${routeName}_classes_my_teach_live_small_section_create`,
                        component: () => import('@/views/my/classes/teaching/live/small/create'),
                        meta: { key: 'my_teach', title: '添加课时', needLogin: true }
                      },
                      {
                        path: ':id/edit',
                        name: `${routeName}_classes_my_teach_live_small_section_edit`,
                        component: () => import('@/views/my/classes/teaching/live/small/edit'),
                        meta: { key: 'my_teach', title: '编辑课时', needLogin: true }
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            path: 'correcting',
            name: `${routeName}_classes_correcting`,
            component: () => import('@/views/my/classes/correcting/exam'),
            meta: { key: 'correcting', needLogin: true }
          },
          {
            path: 'correcting/exam/details',
            name: `${routeName}_classes_correcting_exam`,
            component: () => import('@/views/my/classes/correcting/exam/details'),
            meta: { key: 'correcting', needLogin: true }
          },
          {
            path: 'correcting/exam/topic',
            name: `${routeName}_classes_correcting_exam_topic`,
            component: () => import('@/views/my/classes/correcting/exam/topic'),
            meta: { key: 'correcting', needLogin: true }
          },
          {
            path: 'material',
            name: `${routeName}_classes_material`,
            component: () => import('@/views/my/classes/material/picture'),
            meta: { key: 'material', needLogin: true }
          },
          {
            path: 'material/video',
            name: `${routeName}_classes_material_video`,
            component: () => import('@/views/my/classes/material/video'),
            meta: { key: 'material', needLogin: true }
          },
          {
            path: 'material/audio',
            name: `${routeName}_classes_material_audio`,
            component: () => import('@/views/my/classes/material/audio'),
            meta: { key: 'material', needLogin: true }
          },
          {
            path: 'material/file',
            name: `${routeName}_classes_material_file`,
            component: () => import('@/views/my/classes/material/file'),
            meta: { key: 'material', needLogin: true }
          },
          {
            path: 'schedule',
            name: `${routeName}_classes_my_schedule`,
            component: () => import('@/views/my/classes/schedule/index'),
            meta: { key: 'my_schedule', title: '教学中心-直播课表', needLogin: true }
          }
        ]
      },
      {
        path: 'exam',
        component: () => import('@/views/my'),
        meta: { key: 'exam', title: '考试中心', needLogin: true },
        children: [
          {
            path: 'my_exams',
            name: `${routeName}_exam_my_exams`,
            component: () => import('@/views/my/exam/index'),
            meta: { key: 'my_exams', needLogin: true }
          },
          {
            path: 'wrong',
            name: `${routeName}_exam_my_exams_wrong`,
            component: () => import('@/views/my/exam/wrong'),
            meta: { key: 'my_exams', needLogin: true }
          },
          {
            path: 'collected_topics',
            name: `${routeName}_exam_collected_topics`,
            component: () => import('@/views/my/exam/collection'),
            meta: { key: 'collected_topics', needLogin: true }
          },
          {
            path: 'topic',
            name: `${routeName}_exam_collected_topics_flow`,
            component: () => import('@/views/my/exam/topic'),
            meta: { key: 'collected_topics', needLogin: true }
          },
          {
            path: 'stay',
            name: `${routeName}_exam_unexam`,
            component: () => import('@/views/my/exam/stay/index'),
            redirect: 'stay/student',
            meta: { title: '我的待考' },
            children: [
              {
                path: 'student',
                name: `${routeName}_exam_unexam_student`,
                component: () => import('@/views/my/exam/stay/student'),
                meta: { key: 'unexam', title: '派发考试', needLogin: true }
              },
              {
                path: 'order',
                name: `${routeName}_exam_unexam_order`,
                component: () => import('@/views/my/exam/stay/order'),
                meta: { key: 'unexam', title: '购买考试', needLogin: true }
              }
            ]
          }
        ]
      }
    ]
  },
  {
    path: '/thirdlogin/bind',
    component: () => import('@/views/my/profile/thirdloginbind'),
    meta: { title: '第三方登录', needLogin: true }
  },
  {
    path: '/pageUser/user/weixinpc',
    component: () => import('@/views/my/finance/weixin'),
    meta: { title: '微信提现', needLogin: false }
  }
]
export default my
